package com.raise.drive.web.controller;

import org.springframework.web.servlet.ModelAndView;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;

import com.raise.drive.commons.web.springmvc.controller.BaseController;

/**
 * @author Eugene Rozov
 */
public class HomeController extends BaseController {

//    private UserService userService;

    private int randomUsersCount;

    public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response) throws Exception {

//        List<User> randomUsers = userService.getRandomUsers(randomUsersCount);

        ModelAndView modelAndView = new ModelAndView(getSuccessView());
//        modelAndView.addObject("randomUsers", randomUsers);
        return modelAndView;
    }

//    public void setUserService(UserService userService) {
//        this.userService = userService;
//    }

    public void setRandomUsersCount(int randomUsersCount) {
        this.randomUsersCount = randomUsersCount;
    }
}

